package com.zqc.myp;

import android.util.Log;

import java.util.HashMap;

/** Created by zhangqianchu on 2019/1/31. */
public class MethodCostManager {

  public static HashMap<String, Long> mStartTimes = new HashMap<>();

  public static void start(String key, long time) {
    mStartTimes.put(key, time);
  }

  public static void startCost(String key) {
    long start = mStartTimes.get(key);
    long end = System.currentTimeMillis();
    Log.e("qianchu", "----->>>>>> method : " + key + " cost " + (end - start) + " ms <<<<<<-----");
    mStartTimes.remove(key);
  }
}
